<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>05_网格布局-设置单元格的数量和尺寸</title>
        <style>
            .container {
                width: 400px;
                height: 400px;
                background-color: #ccc;

                display: grid;

                grid-template-rows: repeat(4,100px);
                grid-template-columns: repeat(4,100px);
            }

            .item {
                font-size: 30px;
                background-color: tomato;
            }

            .item01 {
                background-color: skyblue;

                /* 行的起始位置 */
                /* 列的起始位置 */
                /* 行的结束位置 */
                /* 列的结束位置 */
                /* grid-row-start: 1;
                grid-column-start: 1;
                grid-row-end: 3;
                grid-column-end:3; */

                /* （1）正数 */
                grid-row-start: 1;
                grid-row-end: 3;
                grid-column-start: 1;
                grid-column-end:3;

                /* （2）负数 */
                /* grid-row-start: -1;
                grid-row-end: -3;
                grid-column-start: -1;
                grid-column-end: -3; */

                /* grid-row-start: 2;
                grid-row-end: 4;
                grid-column-start: 2;
                grid-column-end: 4;

                grid-row-start: 1;
                grid-row-end: -1;
                grid-column-start: 1;
                grid-column-end: -1; */
            }

            .item02 {
                background-color: aqua;

                /* grid-row-start: 1;
                grid-row-end: 3;
                grid-column-start: 3;
                grid-column-end: 5; */

                /* 简写 */
                grid-row: 1 / 3;
                grid-column: 3 / 5;
            }

            .item03 {
                background-color: purple;
                /* grid-row: 3 / 5;
                grid-column: 1 / 3; */

                /* 过渡 */
                /* grid-row-start: 3;
                grid-row-end: span 2;

                grid-column-start: 1;
                grid-column-end: span 2; */

                /* 究极 --在哪开始 在哪合并*/
                grid-row: span 2;
                grid-column: span 2;
            }
        </style>

    </head>
    <body>
        <div class="container">
            <div class="item item01">1</div>
            <div class="item item02">2</div>
            <div class="item item03">3</div>
            <div class="item">4</div>
            <div class="item">5</div>
        </div>
    </body>
</html>